<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
	<script type="text/javascript">
		currentDevice=0;
		currentDeviceId = 0;
		$(function(){
			$(".device_use_space_background").attr("className","device_use_space_background<s:property value="room.roomImage" />")
		})
	</script>
  </head>
  
  <body>
  
  	<div class="device_use_space_background">
  		<s:iterator id="device" value="deviceList" status="status">
				<div onclick="pressDevice(<s:property value="deviceId" />,'<s:property value="#status.index+1" />','<s:property value="deviceType" />','space');" id="device_use_img_li<s:property value="#status.index+1" />" 
					style="position: absolute;left: <s:property value="deviceX" />;top: <s:property value="deviceY" />;"
					<s:if test="deviceType==1 && isOpen == 1">
	   					class="device_use_img_li_on_off_open_s"
	   				</s:if>	
	   				<s:elseif test="deviceType==1 && isOpen == 0">
						class="device_use_img_li_on_off_s"
					</s:elseif>
					<s:elseif test="deviceType==2 && isOpen == 1">
						class="device_use_img_li_turn_open_s"
					</s:elseif>
					<s:elseif test="deviceType==2 && isOpen == 0">
						class="device_use_img_li_turn_s"
					</s:elseif>
	   				<s:elseif test="deviceType==3 && isOpen == 1">
						class="device_use_img_li_socket_open_s"
					</s:elseif>	
					<s:elseif test="deviceType==3 && isOpen == 0">
						class="device_use_img_li_socket_s"
					</s:elseif>	
					
				><s:property value="deviceName"/></div>
			</s:iterator>
  		
  	</div>
  </body>
</html>
